package com.martin.fastframe.ui.binding.adapter

import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.activity.viewModels
import androidx.lifecycle.ViewModelProvider
import com.martin.fastframe.R
import com.martin.fastframe.databinding.ActivityBindingAdapterBinding
import com.martin.lib_base.base.BaseActivity

/**
 * bindingAdapter测试页面
 */
class BindingAdapterActivity : BaseActivity<ActivityBindingAdapterBinding,BindingAdapterViewModel>() {

    override fun getViewModelClass() = BindingAdapterViewModel::class.java

    override fun layoutId() = R.layout.activity_binding_adapter

    override fun initOnCreate(savedInstanceState: Bundle?) {
        binding.viewModel = viewModel

    }

    companion object {
        @JvmStatic
        fun start(context: Context) {
            val starter = Intent(context, BindingAdapterActivity::class.java)
            context.startActivity(starter)
        }
    }
}